package thrift;

import org.apache.thrift.TException;

import java.nio.ByteBuffer;

public class TestServiceImpl implements TestService.Iface {

    @Override
    public void getVoid(Test test) throws TException {
        System.out.println("TestServiceImpl + " + test.toString());
    }

    @Override
    public boolean getBool(Test test) throws TException {
        System.out.println("TestServiceImpl.getBool() + " + test.bool_);
        return test.bool_;
    }

    @Override
    public byte getI8(Test test) throws TException {
        System.out.println("TestServiceImpl.getI8() + " + test.i8_);
        return test.i8_;
    }

    @Override
    public short getI16(Test test) throws TException {
        System.out.println("TestServiceImpl.getI16() + " + test.i16_);
        return test.i16_;
    }

    @Override
    public int getI32(Test test) throws TException {
        System.out.println("TestServiceImpl.getI32() + " + test.i32_);
        return test.i32_;
    }

    @Override
    public long getI64(Test test) throws TException {
        System.out.println("TestServiceImpl.getI64() + " + test.i64_);
        return test.i64_;
    }

    @Override
    public double getDouble(Test test) throws TException {
        System.out.println("TestServiceImpl.getDouble() + " + test.double_);
        return test.double_;
    }

    @Override
    public String getString(Test test) throws TException {
        System.out.println("TestServiceImpl.getString() + " + test.string_);
        return test.string_;
    }

    @Override
    public ByteBuffer getBinary(Test test) throws TException {
        System.out.println("TestServiceImpl.getBinary() + " + test.binary_);
        return test.binary_;
    }

}